package com.myhouse.biz.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.myhouse.biz.MessageService;
import com.myhouse.dao.MessageDao;
import com.myhouse.entity.Message;
@Service
public class MessageServiceImpl implements MessageService {
	
	@Resource
	private MessageDao messageDao;
	

	public void addMessage(Message message) {
		messageDao.addMessage(message);
	}


	@Override
	public List<Message> getMessageFromOrTo(Integer fromUserId, Integer toUserId) {
		return messageDao.getMessageFromOrTo(fromUserId, toUserId);
	}

	@Override
	public void updateMessage(Message message) {
		messageDao.updateMessage(message);
	}


	@Override
	public List<Message> getMessage(int id) {
		return messageDao.getMessage(id);
	}

	

}
